package com.joysuch.wwyt.edu.enums;



/**
 * @author zero
 * @since 2021/11/12 15:46
 */
public enum CertificateUserTypes {
    //人员/承包商人员flag 0: 人员; 1 承包商人员
    CONTRACTOR_STAFF(true,1,"承包商人员"),
    USER(false,0,"本公司人员");
    private Boolean flag;
    private Integer code;
    private String type;

    CertificateUserTypes(Boolean flag, Integer code, String type) {
        this.flag = flag;
        this.code = code;
        this.type = type;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static CertificateUserTypes findByName(String name) {
        CertificateUserTypes[] values = CertificateUserTypes.values();
        for (CertificateUserTypes v : values) {
            if (v.getType().equals(name)) {
                return v;
            }
        }
        return null;
    }
}
